<?php
// This file loads all required files.
// /src/controller/include.inc

if(version_compare(PHP_VERSION, '5.3.0', '>='))
{
	// PHP version >= 5.3.0 supports __DIR__ so we use it.
	
	// Silex:
	require_once __DIR__.'/../vendor/autoload.php';
	require_once __DIR__.'/../app/app.php';
	
	// Controller:
	require_once __DIR__.'/controller/controller.php';
	require_once __DIR__.'/controller/const.php';
	require_once __DIR__.'/controller/route.php';
	
	// Model:
	require_once __DIR__.'/model/database.php';
	require_once __DIR__.'/model/database.conf';
	require_once __DIR__.'/model/model.php'; 
	require_once __DIR__.'/model/post.php';
} 
else 
{
	// PHP version < 5.3.0 doesn't support __DIR__ so we define it this way.
	
	// Silex:
	require_once dirname(__FILE__).'/../vendor/autoload.php';
	require_once dirname(__FILE__).'/../app/app.php';
	
	// Controller:
	require_once dirname(__FILE__).'/controller/controller.php';
	require_once dirname(__FILE__).'/controller/const.php';
	require_once dirname(__FILE__).'/controller/route.php';
	
	// Model:
	require_once dirname(__FILE__).'/model/database.php';
	require_once dirname(__FILE__).'/model/database.conf'; 
	require_once dirname(__FILE__).'/model/model.php';
	require_once dirname(__FILE__).'/model/post.php';
}

?>